package com.woniuxy.service;


import com.woniuxy.dao.ManagerDao;
import com.woniuxy.dao.RoleDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Map;
import java.util.Set;

public class ManagerServiceImpl {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        ManagerDao managerDao = applicationContext.getBean("managerDao", ManagerDao.class);
        RoleDao roleDao = applicationContext.getBean("roleDao", RoleDao.class);
        Map one1 = roleDao.findOne(1);
        Map<String, String> one = managerDao.getOne(1);
        Set<Map.Entry<String, String>> keys = one.entrySet();
        for (Map.Entry<String, String> key: keys) {
            System.out.println(key);
        }
    }
}
